<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad_10">
    <div class="table-list">
        <form name="smsform" action="" method="get">
            <input type="hidden" value="goods" name="m">
            <input type="hidden" value="goods" name="c">
            <input type="hidden" value="init" name="a">
            <input type="hidden" value="<?php echo $_GET['menuid'] ?>" name="menuid">
            <table width="100%" cellspacing="0">
                <thead>
                <tr>
                    <th>商品名称</th>
                    <th>商品类型</th>
                    <th>发货方式</th>
                    <th>价格</th>
                    <th>支持游戏名称</th>
                    <th>号码长度</th>
                    <th>号码等级</th>
                    <th>号码Ｑ龄</th>
                    <th>好友数量</th>
                    <th>剩余数量</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <?php
                if (is_array($infos)) {
                    foreach ($infos as $info) {
                        ?>
                        <tr>
                            <td align="center"><?= $info['name'] ?></td>
                            <td align="center">QQ号码</td>
                            <td align="center">
                                <?php
                                if ($info['ship'] == 1) {
                                    echo "全部";
                                } elseif ($info['ship'] == 2) {
                                    echo "自动";
                                } elseif ($info['ship'] == 3) {
                                    echo "手动";
                                } elseif ($info['ship'] == 4) {
                                    echo "QQ选号";
                                }
                                ?>
                            </td>
                            <td align="center"><?= $info['price'] ?></td>
                            <td align="center">
                                <?php
                                if ($info['game'] == 1) {
                                    echo '能玩DNF';
                                } elseif ($info['']) {
                                    echo '不能玩DNF';
                                } else {
                                    echo '未过滤';
                                }
                                ?>
                            </td>
                            <td align="center">
                                <?php
                                if ($info['level_type'] == 1) {
                                    echo '0-3级';
                                } elseif ($info['level_type'] == 2) {
                                    echo '4-7级';
                                } elseif ($info['level_type'] == 3) {
                                    echo '8-15级';
                                } elseif ($info['level_type'] == 4) {
                                    echo '16-31级';
                                } elseif ($info['level_type'] == 5) {
                                    echo '32-47级';
                                } elseif ($info['level_type'] == 6) {
                                    echo '48级以上';
                                }
                                ?>
                            </td>
                            <td align="center">
                                <?php
                                if ($info['num_type'] == 1) {
                                    echo '5位';
                                } elseif ($info['num_type'] == 2) {
                                    echo '6位';
                                } elseif ($info['num_type'] == 3) {
                                    echo '7位';
                                } elseif ($info['num_type'] == 4) {
                                    echo '8位';
                                } elseif ($info['num_type'] == 5) {
                                    echo '9位';
                                }
                                ?>
                            </td>
                            <td align="center">
                                <?php
                                if ($info['year_type'] == 1) {
                                    echo '1-3年';
                                } elseif ($info['year_type'] == 2) {
                                    echo '4-6年';
                                } elseif ($info['year_type'] == 3) {
                                    echo '7-10年';
                                } elseif ($info['year_type'] == 4) {
                                    echo '10年以上';
                                }
                                ?>
                            </td>
                            <td align="center">
                                <?php
                                if ($info['friend_num'] == 1) {
                                    echo '1-100 ';
                                } elseif ($info['friend_num'] == 2) {
                                    echo '100-300';
                                } elseif ($info['friend_num'] == 3) {
                                    echo '300以上';
                                }
                                ?>
                            </td>
                            <td align="center"><?= $info['reserve'] ?></td>
                            <td align="center">
                                <a href="index.php?m=goods&c=goods&a=goods_view&id=<?= $info['id'] ?>&menuid=<?= $_GET['menuid'];?>&pc_hash=<?= $_GET['pc_hash'] ?>">查看号码</a>
                                <a href="index.php?m=goods&c=goods&a=goods_import&id=<?= $info['id'] ?>&type=<?= $info['type'] ?>&menuid=<?= $_GET['menuid'];?>&pc_hash=<?= $_GET['pc_hash'] ?>">添加号码</a>
                                <a href="index.php?m=goods&c=goods&a=goods_edit&id=<?= $info['id'] ?>&menuid=<?= $_GET['menuid'];?>&pc_hash=<?= $_GET['pc_hash'] ?>">编辑商品</a>
                                <a href="index.php?m=goods&c=goods&a=goods_export_data&id=<?= $info['id'] ?>&menuid=<?= $_GET['menuid'];?>&pc_hash=<?= $_GET['pc_hash'] ?>">导出QQ</a>
                                <!--                                <a href="/index.php?m=goods&c=goods&a=goods_del&id=-->
                                <?//= $info['id'] ?><!--&pc_hash=--><?//= $_GET['pc_hash'] ?><!--">商品删除</a>-->
                            </td>
                        </tr>
                        <?php
                    }
                }
                ?>
                </tbody>
            </table>
            <div id="pages"><?php echo $pages?></div>
        </form>
    </div>
</div>
<br>
<br>
</body>
</html>